<%@ page import="dao.DiaryDao" %>
<%@ page import="entity.DiaryInFo" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/13
  Time: 14:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
</head>
<body>
<%
    Integer id=Integer.valueOf(request.getParameter("id"));
    DiaryDao dd=new DiaryDao();
    DiaryInFo d=dd.findById(id);
    request.setAttribute("d",d);
%>
<form method="post" action="save">
    <table class="table table-bordered">
        <caption style="text-align: center">查看日记</caption>
        <tr><td>${d.diaryDay}
            <input type="hidden" value="${d.id}" name="id">

        </td>
            <td>${d.weather}&nbsp;${d.mood}

            </td>
        </tr>
        <tr>
            <td colspan="2">
                <textarea style="width: 100%;height: 500px" value="" name="contents">${d.contents}</textarea>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <button class="btn btn-primary">保存</button>
                <a href="diaryList" class="btn btn-primary">返回</a></td>
        </tr>
    </table>
</form>
</body>
</html>
